<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Home extends MY_Controller {

    public function __construct() {
        parent::__construct();


        $this->data['menu_config'] = $this->menu_config_1;
        $this->load_lang('home');
        $this->data['lang'] = $this->lang->language;
        
        
        
    }

    public function index() {
        $this->data['heading_title'] = $this->lang->line('heading_title');
        
        $this->load->model('zone_model', 'zone');
        $this->load->model('industry_category_model', 'industry_category');
        $this->load->model('industry_model', 'industry');
        $this->load->model('positions_model', 'positions');
        
        $this->data['zones'] = $this->zone->getZoneByCountry($this->language->country_id);
        $this->data['top_zones'] = $this->zone->getZoneByCountry($this->language->country_id,array('top' => 1));
        $this->data['positions'] = $this->positions->getPositions();
        $industry_categories = $this->industry_category->getIndustryCategories();
        
        $industry_list = array();
        foreach($industry_categories as $category){
            $industry_list[$category->name] = $this->industry->getIndustriesByCategory($category->category_id);
        }
        $this->data['industry_list'] = $industry_list;
        $this->load_view('home');
    }

}